220
|
How can I remove all the columns

with ComboBox1 do
begin
Columns.Clear();
end
|
219
|
How can I remove a column

with ComboBox1 do
begin
Columns.Remove('A');
end
|
482
|
How can I put icons/images into buttons

with ComboBox1 do
begin
BeginUpdate();
SingleEdit := True;
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
Columns.Add('');
with (IUnknown(Columns.Add('C+B')) as EXCOMBOBOXLib_TLB.Column) do
begin
AllowSizing := False;
Width := 48;
FormatColumn := '` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `';
Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1);
Def[EXCOMBOBOXLib_TLB.exCellHasCheckBox] := OleVariant(True);
Def[EXCOMBOBOXLib_TLB.exCellHasButton] := OleVariant(True);
Def[EXCOMBOBOXLib_TLB.exCellButtonAutoWidth] := OleVariant(True);
Position := 0;
end;
DrawGridLines := EXCOMBOBOXLib_TLB.exVLines;
DefaultItemHeight := 20;
with Items do
begin
AddItem('Item 1');
AddItem('Item 2');
AddItem('Item 3');
AddItem('Item 4');
AddItem('Item 5');
AddItem('Item 6');
AddItem('Item 7');
AddItem('Item 8');
end;
EndUpdate();
end
|
205
|
How can I programmatically filter a column

with ComboBox1 do
begin
with (IUnknown(Columns.Add('Filter')) as EXCOMBOBOXLib_TLB.Column) do
begin
DisplayFilterButton := True;
FilterType := EXCOMBOBOXLib_TLB.exNonBlanks;
end;
Items.AddItem(Null);
Items.AddItem('not empty');
ApplyFilter();
end
|
503
|
How can I programmatically clear the control's filter
// Click event - Occurs when the user presses and then releases the left mouse button over the list control.
procedure TForm1.ComboBox1Click(ASender: TObject; );
begin
with ComboBox1 do
begin
ClearFilter();
end
end;
with ComboBox1 do
begin
BeginUpdate();
(IUnknown(Columns.Add('Item')) as EXCOMBOBOXLib_TLB.Column).DisplayFilterButton := True;
with (IUnknown(Columns.Add('Pos')) as EXCOMBOBOXLib_TLB.Column) do
begin
AllowSizing := False;
AllowSort := False;
Width := 32;
FormatColumn := '1 apos ``';
Position := 0;
end;
with Items do
begin
AddItem('Item A');
AddItem('Item B');
AddItem('Item C');
end;
FilterBarPromptVisible := EXCOMBOBOXLib_TLB.exFilterBarPromptVisible;
FilterBarPromptPattern := 'B';
EndUpdate();
end
|
91
|
How can I programmatically change the column where incremental searching is performed

with ComboBox1 do
begin
Columns.Add('Column 1');
Columns.Add('Column 2');
with Items do
begin
CellCaption[OleVariant(AddItem('Item 1')),OleVariant(1)] := 'SubItem 1';
end;
SearchColumnIndex := 1;
end
|
488
|
How can I prevent showing the lines for the hierarchy while using the exMatchingItemsOnly option

with ComboBox1 do
begin
BeginUpdate();
LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot;
TreeColumnIndex := -1;
FilterInclude := EXCOMBOBOXLib_TLB.exMatchingItemsOnly;
with (IUnknown(Columns.Add('Column')) as EXCOMBOBOXLib_TLB.Column) do
begin
DisplayFilterButton := True;
FilterType := EXCOMBOBOXLib_TLB.exFilter;
Filter := 'C1|C2';
end;
with Items do
begin
h := AddItem('R1');
InsertItem(h,Null,'C1');
InsertItem(h,Null,'C2');
ExpandItem[h] := True;
h := AddItem('R2');
InsertItem(h,Null,'C1');
InsertItem(h,Null,'C2');
end;
ApplyFilter();
EndUpdate();
end
|
315
|
How can I merge cells

with ComboBox1 do
begin
MarkSearchColumn := False;
TreeColumnIndex := -1;
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := AddItem('Cell 1');
CellCaption[OleVariant(h),OleVariant(1)] := 'This is bit of text that''s shown on multiple lines. This is bit of text that''s shown on multiple lines.';
CellSingleLine[OleVariant(h),OleVariant(1)] := EXCOMBOBOXLib_TLB.exCaptionWordWrap;
h := AddItem('This is bit of text merges all cells in the item');
ItemDivider[h] := 0;
CellHAlignment[OleVariant(h),OleVariant(0)] := EXCOMBOBOXLib_TLB.CenterAlignment;
end;
end
|
316
|
How can I merge cells

with ComboBox1 do
begin
DrawGridLines := EXCOMBOBOXLib_TLB.exAllLines;
MarkSearchColumn := False;
Columns.Add('C1');
Columns.Add('C2');
Columns.Add('C3');
with Items do
begin
h := AddItem('this cell merges the first two columns');
CellMerge[OleVariant(h),OleVariant(0)] := OleVariant(1);
h := AddItem(Null);
CellCaption[OleVariant(h),OleVariant(1)] := 'this cell merges the last two columns';
CellMerge[OleVariant(h),OleVariant(1)] := OleVariant(2);
h := AddItem('this cell merges the all three columns');
CellMerge[OleVariant(h),OleVariant(0)] := OleVariant(1);
CellMerge[OleVariant(h),OleVariant(0)] := OleVariant(2);
h := AddItem('this draws a divider item');
ItemDivider[h] := 0;
end;
end
|
364
|
How can I mark the cells that has a specified type, ie strings only

with ComboBox1 do
begin
ConditionalFormats.Add('type(%0) = 8',Null).ForeColor := $ff;
Columns.Add('');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,OleVariant(2));
InsertItem(h,Null,'Chld 3');
ExpandItem[h] := True;
end;
end
|
467
|
How can I make bigger/enlarge the control's drop down button

with ComboBox1 do
begin
BeginUpdate();
LabelHeight := 40;
ScrollWidth := 40;
EndUpdate();
end
|
254
|
How can I make an item unselectable, or not selectable

with ComboBox1 do
begin
Columns.Add('Column');
with Items do
begin
h := AddItem('unselectable - you can''t get selected');
SelectableItem[h] := False;
AddItem('selectable');
end;
end
|
7
|
How can I insert an icon to column's header

with ComboBox1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
(IUnknown(Columns.Add('ColumnName')) as EXCOMBOBOXLib_TLB.Column).HTMLCaption := '<b>HTML</b> Column <img>1</img> Icon';
end
|
6
|
How can I insert an icon to column's header

with ComboBox1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
(IUnknown(Columns.Add('ColumnName')) as EXCOMBOBOXLib_TLB.Column).HeaderImage := 1;
end
|
295
|
How can I insert a hyperlink or an anchor element

with ComboBox1 do
begin
Columns.Add('Column');
with Items do
begin
CellCaptionFormat[OleVariant(AddItem('Just an <a1>anchor</a> element ...')),OleVariant(0)] := EXCOMBOBOXLib_TLB.exHTML;
end;
with Items do
begin
CellCaptionFormat[OleVariant(AddItem('Just another <a2>anchor</a> element ...')),OleVariant(0)] := EXCOMBOBOXLib_TLB.exHTML;
end;
end
|
360
|
How can I highlight the cells or items that starts with a specified string

with ComboBox1 do
begin
ConditionalFormats.Add('%0 startwith ''C''',Null).Underline := True;
Columns.Add('');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'SChild 3');
ExpandItem[h] := True;
end;
end
|
421
|
How can I highlight only parts of the cells

with ComboBox1 do
begin
with (IUnknown(Columns.Add('')) as EXCOMBOBOXLib_TLB.Column) do
begin
Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1);
FormatColumn := 'value replace ''hil'' with ''<fgcolor=FF0000><b>hil</b></fgcolor>''';
end;
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
ExpandItem[h] := True;
end;
end
|
11
|
How can I hide the searching column

with ComboBox1 do
begin
MarkSearchColumn := False;
Columns.Add('Column 1');
Columns.Add('Column 2');
Items.AddItem(Null);
end
|
126
|
How can I hide the locked / fixed items

with ComboBox1 do
begin
ShowLockedItems := False;
Columns.Add('Column');
with Items do
begin
LockedItemCount[EXCOMBOBOXLib_TLB.exTop] := 1;
CellCaption[OleVariant(LockedItem[EXCOMBOBOXLib_TLB.exTop,0]),OleVariant(0)] := 'locked item';
AddItem('un-locked item');
end;
end
|
342
|
How can I hide the drop down buttons when the control loses the focus

with ComboBox1 do
begin
HideDropDownButton := True;
IntegralHeight := True;
LinesAtRoot := EXCOMBOBOXLib_TLB.exGroupLinesAtRoot;
TreeColumnIndex := 1;
Columns.Add('Column 1');
Columns.Add('Column 2');
with Items do
begin
h := AddItem('Root 1.1');
CellCaption[OleVariant(h),OleVariant(1)] := 'Root 1.2';
CellCaption[OleVariant(InsertItem(h,Null,'Child 1.1')),OleVariant(1)] := 'Child 1.2';
CellCaption[OleVariant(InsertItem(h,Null,'Child 2.1')),OleVariant(1)] := 'Child 2.2';
ExpandItem[h] := True;
h := AddItem('Root 2.1');
CellCaption[OleVariant(h),OleVariant(1)] := 'Root 2.2';
CellCaption[OleVariant(InsertItem(h,Null,'Child 1.1')),OleVariant(1)] := 'Child 1.2';
end;
end
|
253
|
How can I hide or show an item

with ComboBox1 do
begin
Columns.Add('Column');
with Items do
begin
h := AddItem('hidden');
ItemHeight[h] := 0;
SelectableItem[h] := False;
AddItem('visible');
end;
end
|
120
|
How can I hide a column

with ComboBox1 do
begin
(IUnknown(Columns.Add('Hidden')) as EXCOMBOBOXLib_TLB.Column).Visible := False;
Columns.Add('2');
Columns.Add('3');
Columns.Add('4');
Columns.Add('5');
end
|
461
|
How can I have a case-sensitive filter

with ComboBox1 do
begin
BeginUpdate();
MarkSearchColumn := False;
with Columns do
begin
with (IUnknown(Add('Car')) as EXCOMBOBOXLib_TLB.Column) do
begin
DisplayFilterButton := True;
FilterType := Integer(EXCOMBOBOXLib_TLB.exFilterDoCaseSensitive) Or Integer(EXCOMBOBOXLib_TLB.exFilter);
Filter := 'Mazda';
end;
with (IUnknown(Add('Equipment')) as EXCOMBOBOXLib_TLB.Column) do
begin
DisplayFilterButton := True;
DisplayFilterPattern := False;
CustomFilter := 'Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*';
FilterType := Integer(EXCOMBOBOXLib_TLB.exFilterDoCaseSensitive) Or Integer(EXCOMBOBOXLib_TLB.exPattern);
Filter := 'Air Bag';
end;
end;
with Items do
begin
CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag';
CellCaption[OleVariant(AddItem('Toyota')),OleVariant(1)] := 'Air Bag,Air condition';
CellCaption[OleVariant(AddItem('Ford')),OleVariant(1)] := 'Air condition';
CellCaption[OleVariant(AddItem('Nissan')),OleVariant(1)] := 'Air Bag,ABS,ESP';
CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag, ABS,ESP';
CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'ABS,ESP';
end;
ApplyFilter();
EndUpdate();
end
|
462
|
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)

with ComboBox1 do
begin
BeginUpdate();
MarkSearchColumn := False;
with Columns do
begin
with (IUnknown(Add('Car')) as EXCOMBOBOXLib_TLB.Column) do
begin
DisplayFilterButton := True;
FilterType := EXCOMBOBOXLib_TLB.exFilter;
Filter := 'MAZDA';
end;
with (IUnknown(Add('Equipment')) as EXCOMBOBOXLib_TLB.Column) do
begin
DisplayFilterButton := True;
DisplayFilterPattern := False;
CustomFilter := 'Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*';
FilterType := EXCOMBOBOXLib_TLB.exPattern;
Filter := 'AIR BAG';
end;
end;
with Items do
begin
CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag';
CellCaption[OleVariant(AddItem('Toyota')),OleVariant(1)] := 'Air Bag,Air condition';
CellCaption[OleVariant(AddItem('Ford')),OleVariant(1)] := 'Air condition';
CellCaption[OleVariant(AddItem('Nissan')),OleVariant(1)] := 'Air Bag,ABS,ESP';
CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag, ABS,ESP';
CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'ABS,ESP';
end;
ApplyFilter();
EndUpdate();
end
|
29
|
How can I get underlined only a portion of column's header

with ComboBox1 do
begin
(IUnknown(Columns.Add('Column 1')) as EXCOMBOBOXLib_TLB.Column).HTMLCaption := '<u>Col</u>umn 1';
end
|
218
|
How can I get the number or the count of columns
with ComboBox1 do
begin
var_Count := Columns.Count;
end
|
519
|
How can I get the number of results/items being shown in the control's filter bar (sample 4)

with ComboBox1 do
begin
BeginUpdate();
with (IUnknown(Columns.Add('Item')) as EXCOMBOBOXLib_TLB.Column) do
begin
DisplayFilterButton := True;
FilterList := Integer(EXCOMBOBOXLib_TLB.exShowExclude) Or Integer(EXCOMBOBOXLib_TLB.exShowFocusItem) Or Integer(EXCOMBOBOXLib_TLB.exShowCheckBox) Or Integer(EXCOMBOBOXLib_TLB.exSortItemsAsc);
end;
with (IUnknown(Columns.Add('Pos')) as EXCOMBOBOXLib_TLB.Column) do
begin
AllowSizing := False;
AllowSort := False;
Width := 32;
FormatColumn := '1 apos ``';
Position := 0;
end;
with Items do
begin
AddItem('Item A');
AddItem('Item B');
AddItem('Item C');
end;
FilterBarFont := (IUnknown(Font) as stdole_TLB.StdFont);
FilterBarPrompt := FormatABC('`<b>` + value',OleVariant(FilterBarPrompt),Null,Null);
FilterBarCaption := '`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount +' +
' 1) + ` result(s)` ) : (`<fgcolor=808080>`+ itemcount + ` item(s)`) )';
FilterBarPromptVisible := Integer(EXCOMBOBOXLib_TLB.exFilterBarCompact) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarShowCloseOnRight) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarShowCloseIfRequired) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarCaptionVisible) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarVisible) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarPromptVisible);
EndUpdate();
end
|
518
|
How can I get the number of results being shown in the control's filter bar (sample 3)

with ComboBox1 do
begin
BeginUpdate();
(IUnknown(Columns.Add('Item')) as EXCOMBOBOXLib_TLB.Column).DisplayFilterButton := True;
with (IUnknown(Columns.Add('Pos')) as EXCOMBOBOXLib_TLB.Column) do
begin
AllowSizing := False;
AllowSort := False;
Width := 32;
FormatColumn := '1 apos ``';
Position := 0;
end;
with Items do
begin
AddItem('Item A');
AddItem('Item B');
AddItem('Item C');
end;
FilterBarFont := (IUnknown(Font) as stdole_TLB.StdFont);
FilterBarCaption := '`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount +' +
' 1) + ` result(s)` ) : ``)';
FilterBarPromptVisible := Integer(EXCOMBOBOXLib_TLB.exFilterBarCompact) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarCaptionVisible) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarVisible) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarPromptVisible);
with Columns.Item[OleVariant(0)] do
begin
FilterType := EXCOMBOBOXLib_TLB.exFilter;
Filter := 'Item A|Item B';
end;
ApplyFilter();
EndUpdate();
end
|
517
|
How can I get the number of results being shown in the control's filter bar (sample 2, compact)

with ComboBox1 do
begin
BeginUpdate();
(IUnknown(Columns.Add('Item')) as EXCOMBOBOXLib_TLB.Column).DisplayFilterButton := True;
with (IUnknown(Columns.Add('Pos')) as EXCOMBOBOXLib_TLB.Column) do
begin
AllowSizing := False;
AllowSort := False;
Width := 32;
FormatColumn := '1 apos ``';
Position := 0;
end;
with Items do
begin
AddItem('Item A');
AddItem('Item B');
AddItem('Item C');
end;
FilterBarFont := (IUnknown(Font) as stdole_TLB.StdFont);
FilterBarCaption := '`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? `<off -4> ` + abs(matchitemcount + 1) + ` result(s)` : ``)';
FilterBarPromptVisible := Integer(EXCOMBOBOXLib_TLB.exFilterBarCompact) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarSingleLine) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarCaptionVisible) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarVisible) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarPromptVisible);
with Columns.Item[OleVariant(0)] do
begin
FilterType := EXCOMBOBOXLib_TLB.exFilter;
Filter := 'Item A|Item B';
end;
ApplyFilter();
EndUpdate();
end
|
516
|
How can I get the number of results being shown in the control's filter bar (sample 1)

with ComboBox1 do
begin
BeginUpdate();
(IUnknown(Columns.Add('Item')) as EXCOMBOBOXLib_TLB.Column).DisplayFilterButton := True;
with (IUnknown(Columns.Add('Pos')) as EXCOMBOBOXLib_TLB.Column) do
begin
AllowSizing := False;
AllowSort := False;
Width := 32;
FormatColumn := '1 apos ``';
Position := 0;
end;
with Items do
begin
AddItem('Item A');
AddItem('Item B');
AddItem('Item C');
end;
FilterBarFont := (IUnknown(Font) as stdole_TLB.StdFont);
FilterBarCaption := '`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)';
FilterBarPromptVisible := Integer(EXCOMBOBOXLib_TLB.exFilterBarCaptionVisible) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarVisible) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarPromptVisible);
with Columns.Item[OleVariant(0)] do
begin
FilterType := EXCOMBOBOXLib_TLB.exFilter;
Filter := 'Item A|Item B';
end;
ApplyFilter();
EndUpdate();
end
|
504
|
How can I get the number of results after a filter is applied

// Click event - Occurs when the user presses and then releases the left mouse button over the list control.
procedure TForm1.ComboBox1Click(ASender: TObject; );
begin
with ComboBox1 do
begin
ClearFilter();
end
end;
// FilterChange event - Occurs when filter was changed.
procedure TForm1.ComboBox1FilterChange(ASender: TObject; );
begin
with ComboBox1 do
begin
OutputDebugString( 'Items.MatchItemCount' );
OutputDebugString( Items.MatchItemCount );
OutputDebugString( FormatABC('value < 0 ? `filter applied: ` + abs(value + 1) + ` result(s)` : `no filter`',Items.MatchItemCount,Null,Null) );
end
end;
with ComboBox1 do
begin
BeginUpdate();
(IUnknown(Columns.Add('Item')) as EXCOMBOBOXLib_TLB.Column).DisplayFilterButton := True;
with (IUnknown(Columns.Add('Pos')) as EXCOMBOBOXLib_TLB.Column) do
begin
AllowSizing := False;
AllowSort := False;
Width := 32;
FormatColumn := '1 apos ``';
Position := 0;
end;
with Items do
begin
AddItem('Item A');
AddItem('Item B');
AddItem('Item C');
end;
FilterBarPromptVisible := EXCOMBOBOXLib_TLB.exFilterBarPromptVisible;
FilterBarPromptPattern := 'Item';
EndUpdate();
end
|
420
|
How can I get the number of occurrences of a specified string in the cell

with ComboBox1 do
begin
Columns.Add('');
with (IUnknown(Columns.Add('occurrences')) as EXCOMBOBOXLib_TLB.Column) do
begin
ComputedField := 'lower(%0) count ''o''';
FormatColumn := '''contains '' + value + '' of \''o\'' chars''';
end;
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1 oooof the root');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
ExpandItem[h] := True;
end;
end
|
399
|
How can I get the number of occurrences of a specified string in the cell

with ComboBox1 do
begin
Columns.Add('');
with (IUnknown(Columns.Add('occurrences')) as EXCOMBOBOXLib_TLB.Column) do
begin
ComputedField := 'lower(%0) count ''o''';
FormatColumn := '''contains '' + value + '' of \''o\'' chars''';
end;
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1 oooof the root');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
ExpandItem[h] := True;
end;
end
|
277
|
How can I get the handle of an item based on the handle of the cell

with ComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
ItemBold[CellItem[ItemCell[h,OleVariant(0)]]] := True;
end;
end
|
222
|
How can I get the columns as they are shown in the control's sortbar
with ComboBox1 do
begin
var_Object := (IUnknown(Columns.ItemBySortPosition[OleVariant(0)]) as _TLB.Object);
end
|
386
|
How can I get second part of the date

with ComboBox1 do
begin
Columns.Add('Date');
(IUnknown(Columns.Add('Second')) as EXCOMBOBOXLib_TLB.Column).ComputedField := 'sec(date(%0))';
with Items do
begin
AddItem('1/11/2001 10:10:00 AM');
AddItem('2/22/2002 11:01:22 AM');
AddItem('3/13/2003 12:23:01 PM');
AddItem('4/14/2004 1:11:59 PM');
end;
end
|
65
|
How can I get ride/hide of the "Filter For" field

with ComboBox1 do
begin
with (IUnknown(Columns.Add('Column')) as EXCOMBOBOXLib_TLB.Column) do
begin
DisplayFilterButton := True;
DisplayFilterPattern := False;
end;
end
|
368
|
How can I get or display the integer part of the cell

with ComboBox1 do
begin
Columns.Add('Number');
(IUnknown(Columns.Add('Int')) as EXCOMBOBOXLib_TLB.Column).ComputedField := 'int(%0)';
with Items do
begin
AddItem('-1.98');
AddItem('0.99');
AddItem('1.23');
AddItem('2.34');
end;
end
|
379
|
How can I get only the year part from a date expression

with ComboBox1 do
begin
Columns.Add('Date');
(IUnknown(Columns.Add('Year')) as EXCOMBOBOXLib_TLB.Column).ComputedField := 'year(%0)';
with Items do
begin
AddItem('1/1/2001 10:00:00 AM');
AddItem('2/2/2002 11:00:00 AM');
AddItem('3/3/2003 12:00:00 PM');
AddItem('4/4/2004 1:00:00 PM');
end;
end
|
385
|
How can I get minute part of the date

with ComboBox1 do
begin
Columns.Add('Date');
(IUnknown(Columns.Add('Minute')) as EXCOMBOBOXLib_TLB.Column).ComputedField := 'min(date(%0))';
with Items do
begin
AddItem('1/11/2001 10:10:00 AM');
AddItem('2/22/2002 11:01:00 AM');
AddItem('3/13/2003 12:23:00 PM');
AddItem('4/14/2004 1:11:00 PM');
end;
end
|
309
|
How can I fix or lock items

with ComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
LockedItemCount[EXCOMBOBOXLib_TLB.exTop] := 1;
CellCaption[OleVariant(LockedItem[EXCOMBOBOXLib_TLB.exTop,0]),OleVariant(0)] := 'This is a locked item, fixed to the top side of the control.';
ItemBackColor[LockedItem[EXCOMBOBOXLib_TLB.exTop,0]] := $bac4c4;
LockedItemCount[EXCOMBOBOXLib_TLB.exBottom] := 2;
CellCaption[OleVariant(LockedItem[EXCOMBOBOXLib_TLB.exBottom,0]),OleVariant(0)] := 'This is a locked item, fixed to the top side of the control.';
ItemBackColor[LockedItem[EXCOMBOBOXLib_TLB.exBottom,0]] := $bac4c4;
CellCaption[OleVariant(LockedItem[EXCOMBOBOXLib_TLB.exBottom,1]),OleVariant(0)] := 'This is a locked item, fixed to the top side of the control.';
ItemBackColor[LockedItem[EXCOMBOBOXLib_TLB.exBottom,1]] := $bababa;
end;
end
|
307
|
How can I fix or lock an item on the top of the control

with ComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
LockedItemCount[EXCOMBOBOXLib_TLB.exTop] := 1;
CellCaption[OleVariant(LockedItem[EXCOMBOBOXLib_TLB.exTop,0]),OleVariant(0)] := 'This is a locked item, fixed to the top side of the control.';
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
end;
end
|
308
|
How can I fix or lock an item on the bottom side of the control

with ComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
LockedItemCount[EXCOMBOBOXLib_TLB.exBottom] := 1;
CellCaption[OleVariant(LockedItem[EXCOMBOBOXLib_TLB.exBottom,0]),OleVariant(0)] := 'This is a locked item, fixed to the bottom side of the control.';
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
end;
end
|
292
|
How can I find the cell being clicked in a radio group

with ComboBox1 do
begin
MarkSearchColumn := False;
SelBackColor := RGB(255,255,128);
SelForeColor := RGB(0,0,0);
Columns.Add('C1');
Columns.Add('C2');
Columns.Add('C3');
with Items do
begin
h := AddItem('Cell 1');
CellCaption[OleVariant(h),OleVariant(1)] := 'Radio 1';
CellHasRadioButton[OleVariant(h),OleVariant(1)] := True;
CellRadioGroup[OleVariant(h),OleVariant(1)] := 1234;
CellCaption[OleVariant(h),OleVariant(2)] := 'Radio 2';
CellHasRadioButton[OleVariant(h),OleVariant(2)] := True;
CellRadioGroup[OleVariant(h),OleVariant(2)] := 1234;
CellState[OleVariant(h),OleVariant(1)] := 1;
CellBold[Null,OleVariant(CellChecked[1234])] := True;
end;
end
|
489
|
How can I find if there is any filter applied to the control

// FilterChange event - Occurs when filter was changed.
procedure TForm1.ComboBox1FilterChange(ASender: TObject; );
begin
with ComboBox1 do
begin
OutputDebugString( 'If negative, the filter is present, else not' );
OutputDebugString( Items.VisibleItemCount );
end
end;
with ComboBox1 do
begin
BeginUpdate();
LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot;
TreeColumnIndex := -1;
FilterInclude := EXCOMBOBOXLib_TLB.exMatchingItemsOnly;
with (IUnknown(Columns.Add('Column')) as EXCOMBOBOXLib_TLB.Column) do
begin
DisplayFilterButton := True;
FilterType := EXCOMBOBOXLib_TLB.exFilter;
Filter := 'C1';
end;
with Items do
begin
h := AddItem('R1');
InsertItem(h,Null,'C1');
InsertItem(h,Null,'C2');
ExpandItem[h] := True;
h := AddItem('R2');
InsertItem(h,Null,'C1');
InsertItem(h,Null,'C2');
end;
ApplyFilter();
EndUpdate();
end
|
497
|
How can I find if the control is running in DPI mode
with ComboBox1 do
begin
OutputDebugString( FormatABC('dpi = 1 ? `normal/stretch mode` : `dpi mode`',Null,Null,Null) );
end
|
44
|
How can I filter the items that are between an interval/range of dates

with ComboBox1 do
begin
with (IUnknown(Columns.Add('Column')) as EXCOMBOBOXLib_TLB.Column) do
begin
DisplayFilterButton := True;
DisplayFilterDate := True;
end;
ApplyFilter();
end
|
412
|
How can I filter programatically using more columns

with ComboBox1 do
begin
BeginUpdate();
MarkSearchColumn := False;
with Columns do
begin
Add('Car');
Add('Equipment');
end;
with Items do
begin
CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag';
CellCaption[OleVariant(AddItem('Toyota')),OleVariant(1)] := 'Air Bag,Air condition';
CellCaption[OleVariant(AddItem('Ford')),OleVariant(1)] := 'Air condition';
CellCaption[OleVariant(AddItem('Nissan')),OleVariant(1)] := 'Air Bag,ABS,ESP';
CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag, ABS,ESP';
CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'ABS,ESP';
end;
with Columns.Item['Car'] do
begin
FilterType := EXCOMBOBOXLib_TLB.exFilter;
Filter := 'Mazda';
end;
with Columns.Item['Equipment'] do
begin
FilterType := EXCOMBOBOXLib_TLB.exPattern;
Filter := '*ABS*|*ESP*';
end;
ApplyFilter();
EndUpdate();
end
|
426
|
How can I expand all items

with ComboBox1 do
begin
BeginUpdate();
LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot;
Columns.Add('Items');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[0] := True;
end;
EndUpdate();
end
|
341
|
How can I ensure that the drop down portions doesn't show partial items

with ComboBox1 do
begin
IntegralHeight := True;
LinesAtRoot := EXCOMBOBOXLib_TLB.exGroupLinesAtRoot;
TreeColumnIndex := 1;
Columns.Add('Column 1');
Columns.Add('Column 2');
with Items do
begin
h := AddItem('Root 1.1');
CellCaption[OleVariant(h),OleVariant(1)] := 'Root 1.2';
CellCaption[OleVariant(InsertItem(h,Null,'Child 1.1')),OleVariant(1)] := 'Child 1.2';
CellCaption[OleVariant(InsertItem(h,Null,'Child 2.1')),OleVariant(1)] := 'Child 2.2';
ExpandItem[h] := True;
h := AddItem('Root 2.1');
CellCaption[OleVariant(h),OleVariant(1)] := 'Root 2.2';
CellCaption[OleVariant(InsertItem(h,Null,'Child 1.1')),OleVariant(1)] := 'Child 1.2';
end;
end
|
580
|
How can I enable the clear-button (visible only if required)

with ComboBox1 do
begin
BeginUpdate();
Style := EXCOMBOBOXLib_TLB.DropDownList;
HeaderVisible := False;
IntegralHeight := True;
ShowClearButton := 1;
Columns.Add('Column');
with Items do
begin
AddItem('Zero');
AddItem('One');
AddItem('Two');
end;
Select[OleVariant(0)] := 'Zero';
EndUpdate();
end
|
584
|
How can I enable the clear-button (visible only if required and focused)
with ComboBox1 do
begin
BeginUpdate();
Style := EXCOMBOBOXLib_TLB.DropDownList;
HeaderVisible := False;
IntegralHeight := True;
ShowClearButton := 3;
Columns.Add('Column');
with Items do
begin
AddItem('Zero');
AddItem('One');
AddItem('Two');
end;
Select[OleVariant(0)] := 'Zero';
EndUpdate();
end
|
583
|
How can I enable the clear-button (visible only if focused)
with ComboBox1 do
begin
BeginUpdate();
Style := EXCOMBOBOXLib_TLB.DropDownList;
HeaderVisible := False;
IntegralHeight := True;
ShowClearButton := 2;
Columns.Add('Column');
with Items do
begin
AddItem('Zero');
AddItem('One');
AddItem('Two');
end;
Select[OleVariant(0)] := 'Zero';
EndUpdate();
end
|
581
|
How can I enable the clear-button (always visible)

with ComboBox1 do
begin
BeginUpdate();
Style := EXCOMBOBOXLib_TLB.DropDownList;
HeaderVisible := False;
IntegralHeight := True;
ShowClearButton := -1;
Columns.Add('Column');
with Items do
begin
AddItem('Zero');
AddItem('One');
AddItem('Two');
end;
Select[OleVariant(0)] := 'Zero';
EndUpdate();
end
|
18
|
How can I draw grid lines only for visible items

with ComboBox1 do
begin
MarkSearchColumn := False;
DrawGridLines := EXCOMBOBOXLib_TLB.exRowLines;
Columns.Add('Column 1');
Columns.Add('Column 2');
Items.AddItem(OleVariant(0));
Items.AddItem(OleVariant(1));
Items.AddItem(OleVariant(2));
end
|
554
|
How can I display UNICODE characters

with ComboBox1 do
begin
BeginUpdate();
with Font do
begin
Name := 'Arial Unicode';
Size := 22;
end;
HeaderVisible := False;
DefaultItemHeight := 48;
(IUnknown(Columns.Add('')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1);
with Items do
begin
AddItem('Ӓӓ');
AddItem('ᦜᦝ;ᦞ');
AddItem('ɮɭ;ɯ');
AddItem('勳勴勵勶');
FormatCell[OleVariant(AddItem(OleVariant(ComboBox1.Version))),OleVariant(0)] := '(value lfind `UNICODE`) < 0 ? `<fgcolor=FF0000><b>!UNICODE!</b> version</fgcolor> required: ` + value : `` ';
end;
EndUpdate();
end
|
415
|
How can I display true or false instead 0 and -1

with ComboBox1 do
begin
(IUnknown(Columns.Add('Boolean')) as EXCOMBOBOXLib_TLB.Column).FormatColumn := 'value != 0 ? ''true'' : ''false''';
with Items do
begin
AddItem(OleVariant(True));
AddItem(OleVariant(False));
AddItem(OleVariant(True));
AddItem(OleVariant(0));
AddItem(OleVariant(1));
end;
end
|
393
|
How can I display true or false instead 0 and -1

with ComboBox1 do
begin
(IUnknown(Columns.Add('Boolean')) as EXCOMBOBOXLib_TLB.Column).FormatColumn := 'value != 0 ? ''true'' : ''false''';
with Items do
begin
AddItem(OleVariant(True));
AddItem(OleVariant(False));
AddItem(OleVariant(True));
AddItem(OleVariant(0));
AddItem(OleVariant(1));
end;
end
|
374
|
How can I display the time only of a date expression

with ComboBox1 do
begin
Columns.Add('Date');
(IUnknown(Columns.Add('Time')) as EXCOMBOBOXLib_TLB.Column).ComputedField := '''time is:'' + time(date(%0))';
with Items do
begin
AddItem('1/1/2001 10:00:00 AM');
AddItem('2/2/2002 11:00:00 AM');
AddItem('3/3/2003 12:00:00 PM');
AddItem('4/4/2004 1:00:00 PM');
end;
end
|
387
|
How can I display the number of days between two dates

with ComboBox1 do
begin
Columns.Add('Start');
Columns.Add('End');
(IUnknown(Columns.Add('Duration')) as EXCOMBOBOXLib_TLB.Column).ComputedField := '(date(%1)-date(%0)) + '' days''';
with Items do
begin
h := AddItem('1/11/2001');
CellCaption[OleVariant(h),OleVariant(1)] := '1/14/2001';
h := AddItem('2/22/2002');
CellCaption[OleVariant(h),OleVariant(1)] := '3/14/2002';
h := AddItem('3/13/2003');
CellCaption[OleVariant(h),OleVariant(1)] := '4/11/2003';
end;
end
|
390
|
How can I display the currency only for not empty cells

with ComboBox1 do
begin
Columns.Add('Number');
(IUnknown(Columns.Add('Currency')) as EXCOMBOBOXLib_TLB.Column).ComputedField := 'len(%0) ? currency(dbl(%0)) : ''''';
with Items do
begin
AddItem('1.23');
AddItem('2.34');
AddItem('0');
ItemBackColor[AddItem(Null)] := $8080ff;
AddItem('10000.99');
end;
end
|
505
|
How can I display the control's filter on a single line (prompt-combined)

with ComboBox1 do
begin
BeginUpdate();
(IUnknown(Columns.Add('Item')) as EXCOMBOBOXLib_TLB.Column).DisplayFilterButton := True;
with (IUnknown(Columns.Add('Pos')) as EXCOMBOBOXLib_TLB.Column) do
begin
AllowSizing := False;
AllowSort := False;
Width := 32;
FormatColumn := '1 apos ``';
Position := 0;
end;
with Items do
begin
AddItem('Item A');
AddItem('Item B');
AddItem('Item C');
end;
FilterBarCaption := '`<r>` + value';
FilterBarPromptVisible := Integer(EXCOMBOBOXLib_TLB.exFilterBarCompact) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarSingleLine) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarVisible) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarPromptVisible);
with Columns.Item[OleVariant(0)] do
begin
FilterType := EXCOMBOBOXLib_TLB.exFilter;
Filter := 'Item A|Item B';
end;
ApplyFilter();
EndUpdate();
end
|
506
|
How can I display the control's filter on a single line

with ComboBox1 do
begin
BeginUpdate();
(IUnknown(Columns.Add('Item')) as EXCOMBOBOXLib_TLB.Column).DisplayFilterButton := True;
with (IUnknown(Columns.Add('Pos')) as EXCOMBOBOXLib_TLB.Column) do
begin
AllowSizing := False;
AllowSort := False;
Width := 32;
FormatColumn := '1 apos ``';
Position := 0;
end;
with Items do
begin
AddItem('Item A');
AddItem('Item B');
AddItem('Item C');
end;
FilterBarCaption := 'len(value) ? `filter for: <fgcolor 808080>` + value : `<fgcolor 808080>no filter`';
FilterBarPromptVisible := Integer(EXCOMBOBOXLib_TLB.exFilterBarSingleLine) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarVisible);
with Columns.Item[OleVariant(0)] do
begin
FilterType := EXCOMBOBOXLib_TLB.exFilter;
Filter := 'Item A|Item B';
end;
ApplyFilter();
EndUpdate();
end
|
400
|
How can I display the column using currency format and enlarge the font for certain values

with ComboBox1 do
begin
with (IUnknown(Columns.Add('Currency')) as EXCOMBOBOXLib_TLB.Column) do
begin
Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1);
FormatColumn := 'len(value) ? ((0:=dbl(value)) < 10 ? ''<fgcolor=808080><font ;7>'' : ''<b>'') + currency(=:0)';
end;
with Items do
begin
AddItem('1.23');
AddItem('2.34');
AddItem('9.94');
AddItem('11.94');
AddItem('1000');
end;
end
|
422
|
How can I display the column using currency format and enlarge the font for certain values

with ComboBox1 do
begin
with (IUnknown(Columns.Add('Currency')) as EXCOMBOBOXLib_TLB.Column) do
begin
Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1);
FormatColumn := 'len(value) ? ((0:=dbl(value)) < 10 ? ''<fgcolor=808080><font ;7>'' : ''<b>'') + currency(=:0)';
end;
with Items do
begin
AddItem('1.23');
AddItem('2.34');
AddItem('9.94');
AddItem('11.94');
AddItem('1000');
end;
end
|
391
|
How can I display the column using currency

with ComboBox1 do
begin
(IUnknown(Columns.Add('Currency')) as EXCOMBOBOXLib_TLB.Column).FormatColumn := 'currency(dbl(value))';
with Items do
begin
AddItem('1.23');
AddItem('2.34');
AddItem('0');
AddItem(OleVariant(5));
AddItem('10000.99');
end;
end
|
413
|
How can I display the column using currency

with ComboBox1 do
begin
(IUnknown(Columns.Add('Currency')) as EXCOMBOBOXLib_TLB.Column).FormatColumn := 'currency(dbl(value))';
with Items do
begin
AddItem('1.23');
AddItem('2.34');
AddItem('0');
AddItem(OleVariant(5));
AddItem('10000.99');
end;
end
|
356
|
How can I display the column's header using multiple lines

with ComboBox1 do
begin
HeaderHeight := 128;
HeaderSingleLine := False;
(IUnknown(Columns.Add('This is just a column that should break the header.')) as EXCOMBOBOXLib_TLB.Column).Width := 32;
Columns.Add('This is just another column that should break the header.');
end
|
56
|
How can I display the column's filter

with ComboBox1 do
begin
(IUnknown(Columns.Add('')) as EXCOMBOBOXLib_TLB.Column).DisplayFilterButton := True;
end
|
416
|
How can I display only the right part of the cell

with ComboBox1 do
begin
Columns.Add('');
with (IUnknown(Columns.Add('Right')) as EXCOMBOBOXLib_TLB.Column) do
begin
ComputedField := '%0 right 2';
FormatColumn := '''"'' + value + ''"''';
end;
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'SChild 3');
ExpandItem[h] := True;
end;
end
|
395
|
How can I display only the right part of the cell

with ComboBox1 do
begin
Columns.Add('');
with (IUnknown(Columns.Add('Right')) as EXCOMBOBOXLib_TLB.Column) do
begin
ComputedField := '%0 right 2';
FormatColumn := '''"'' + value + ''"''';
end;
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'SChild 3');
ExpandItem[h] := True;
end;
end
|
380
|
How can I display only the month of the date

with ComboBox1 do
begin
Columns.Add('Date');
(IUnknown(Columns.Add('Month')) as EXCOMBOBOXLib_TLB.Column).ComputedField := 'month(%0)';
with Items do
begin
AddItem('1/1/2001 10:00:00 AM');
AddItem('2/2/2002 11:00:00 AM');
AddItem('3/3/2003 12:00:00 PM');
AddItem('4/4/2004 1:00:00 PM');
end;
end
|
394
|
How can I display only the left part of the cell

with ComboBox1 do
begin
Columns.Add('');
(IUnknown(Columns.Add('Left')) as EXCOMBOBOXLib_TLB.Column).ComputedField := '%0 left 2';
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'SChild 3');
ExpandItem[h] := True;
end;
end
|
381
|
How can I display only the day of the date

with ComboBox1 do
begin
Columns.Add('Date');
(IUnknown(Columns.Add('Day')) as EXCOMBOBOXLib_TLB.Column).ComputedField := 'day(%0)';
with Items do
begin
AddItem('1/11/2001 10:00:00 AM');
AddItem('2/22/2002 11:00:00 AM');
AddItem('3/13/2003 12:00:00 PM');
AddItem('4/14/2004 1:00:00 PM');
end;
end
|
439
|
How can I display numbers with 2 digits in each group

with ComboBox1 do
begin
BeginUpdate();
(IUnknown(Columns.Add('Def')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1);
with Items do
begin
h := AddItem(OleVariant(100000.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default)''';
h := AddItem(OleVariant(100000.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''||2'') + '' <fgcolor=808080>(grouping by 2 digits)''';
end;
EndUpdate();
end
|
367
|
How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )

with ComboBox1 do
begin
(IUnknown(Columns.Add('')) as EXCOMBOBOXLib_TLB.Column).ComputedField := 'proper(%0)';
with Items do
begin
h := AddItem('root');
InsertItem(h,Null,'child child');
InsertItem(h,Null,'child child');
InsertItem(h,Null,'child child');
ExpandItem[h] := True;
end;
end
|
168
|
How can I display my text on the scroll bar, using a different font

with ComboBox1 do
begin
ScrollPartCaption[EXCOMBOBOXLib_TLB.exHScroll,EXCOMBOBOXLib_TLB.exThumbPart] := 'This is <s><font Tahoma;12> just </font></s> text';
ColumnAutoResize := False;
ScrollHeight := 20;
(IUnknown(Columns.Add('C1')) as EXCOMBOBOXLib_TLB.Column).Width := 256;
(IUnknown(Columns.Add('C2')) as EXCOMBOBOXLib_TLB.Column).Width := 256;
(IUnknown(Columns.Add('C3')) as EXCOMBOBOXLib_TLB.Column).Width := 256;
end
|
167
|
How can I display my text on the scroll bar, using a different font

with ComboBox1 do
begin
ScrollPartCaption[EXCOMBOBOXLib_TLB.exHScroll,EXCOMBOBOXLib_TLB.exThumbPart] := 'This is just a text';
ScrollFont[EXCOMBOBOXLib_TLB.exHScroll].Size := 12;
ColumnAutoResize := False;
ScrollHeight := 20;
(IUnknown(Columns.Add('C1')) as EXCOMBOBOXLib_TLB.Column).Width := 256;
(IUnknown(Columns.Add('C2')) as EXCOMBOBOXLib_TLB.Column).Width := 256;
(IUnknown(Columns.Add('C3')) as EXCOMBOBOXLib_TLB.Column).Width := 256;
end
|
166
|
How can I display my text on the scroll bar

with ComboBox1 do
begin
ScrollPartCaption[EXCOMBOBOXLib_TLB.exHScroll,EXCOMBOBOXLib_TLB.exThumbPart] := 'this is just a text';
ColumnAutoResize := False;
(IUnknown(Columns.Add('C1')) as EXCOMBOBOXLib_TLB.Column).Width := 256;
(IUnknown(Columns.Add('C2')) as EXCOMBOBOXLib_TLB.Column).Width := 256;
(IUnknown(Columns.Add('C3')) as EXCOMBOBOXLib_TLB.Column).Width := 256;
end
|
438
|
How can I display my numbers using a different decimal separator

with ComboBox1 do
begin
BeginUpdate();
(IUnknown(Columns.Add('Def')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1);
with Items do
begin
h := AddItem(OleVariant(100.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default)''';
h := AddItem(OleVariant(100.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''|;'') + '' <fgcolor=808080>(decimal separator is <b>;</b>)''';
end;
EndUpdate();
end
|
414
|
How can I display icons or images instead numbers

with ComboBox1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
with (IUnknown(Columns.Add('Icons')) as EXCOMBOBOXLib_TLB.Column) do
begin
Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1);
FormatColumn := '''The cell displays the icon <img>''+value+''</img> instead '' + value';
end;
with Items do
begin
AddItem(OleVariant(1));
AddItem(OleVariant(2));
AddItem(OleVariant(3));
end;
end
|
392
|
How can I display icons or images instead numbers

with ComboBox1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
with (IUnknown(Columns.Add('Icons')) as EXCOMBOBOXLib_TLB.Column) do
begin
Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1);
FormatColumn := '''The cell displays the icon <img>''+value+''</img> instead '' + value';
end;
with Items do
begin
AddItem(OleVariant(1));
AddItem(OleVariant(2));
AddItem(OleVariant(3));
end;
end
|
397
|
How can I display dates in short format

with ComboBox1 do
begin
(IUnknown(Columns.Add('Date')) as EXCOMBOBOXLib_TLB.Column).FormatColumn := 'shortdate(value)';
with Items do
begin
AddItem('1/1/2001');
AddItem('2/2/2002');
AddItem('3/3/2003');
AddItem('4/4/2004');
end;
end
|
375
|
How can I display dates in short format

with ComboBox1 do
begin
Columns.Add('Date');
(IUnknown(Columns.Add('ShortFormat')) as EXCOMBOBOXLib_TLB.Column).ComputedField := 'shortdate(%0)';
with Items do
begin
AddItem('1/1/2001 10:00:00 AM');
AddItem('2/2/2002 11:00:00 AM');
AddItem('3/3/2003 12:00:00 PM');
AddItem('4/4/2004 1:00:00 PM');
end;
end
|
418
|
How can I display dates in short format

with ComboBox1 do
begin
(IUnknown(Columns.Add('Date')) as EXCOMBOBOXLib_TLB.Column).FormatColumn := 'shortdate(value)';
with Items do
begin
AddItem('1/1/2001');
AddItem('2/2/2002');
AddItem('3/3/2003');
AddItem('4/4/2004');
end;
end
|
419
|
How can I display dates in my format

with ComboBox1 do
begin
with (IUnknown(Columns.Add('Date')) as EXCOMBOBOXLib_TLB.Column) do
begin
Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1);
FormatColumn := '''<b>'' + year(0:=date(value)) + ''</b><fgcolor=808080><font ;6> ('' + month(=:0) + '' - '' + day(=:0) +'')''';
end;
with Items do
begin
AddItem('1/21/2001');
AddItem('2/22/2002');
AddItem('3/13/2003');
AddItem('4/24/2004');
end;
end
|
398
|
How can I display dates in my format

with ComboBox1 do
begin
with (IUnknown(Columns.Add('Date')) as EXCOMBOBOXLib_TLB.Column) do
begin
Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1);
FormatColumn := '''<b>'' + year(0:=date(value)) + ''</b><fgcolor=808080><font ;6> ('' + month(=:0) + '' - '' + day(=:0) +'')''';
end;
with Items do
begin
AddItem('1/21/2001');
AddItem('2/22/2002');
AddItem('3/13/2003');
AddItem('4/24/2004');
end;
end
|
417
|
How can I display dates in long format

with ComboBox1 do
begin
(IUnknown(Columns.Add('Date')) as EXCOMBOBOXLib_TLB.Column).FormatColumn := 'longdate(value)';
with Items do
begin
AddItem('1/1/2001');
AddItem('2/2/2002');
AddItem('3/3/2003');
AddItem('4/4/2004');
end;
end
|
396
|
How can I display dates in long format

with ComboBox1 do
begin
(IUnknown(Columns.Add('Date')) as EXCOMBOBOXLib_TLB.Column).FormatColumn := 'longdate(value)';
with Items do
begin
AddItem('1/1/2001');
AddItem('2/2/2002');
AddItem('3/3/2003');
AddItem('4/4/2004');
end;
end
|
376
|
How can I display dates in long format

with ComboBox1 do
begin
Columns.Add('Date');
(IUnknown(Columns.Add('LongFormat')) as EXCOMBOBOXLib_TLB.Column).ComputedField := 'longdate(%0)';
with Items do
begin
AddItem('1/1/2001 10:00:00 AM');
AddItem('2/2/2002 11:00:00 AM');
AddItem('3/3/2003 12:00:00 PM');
AddItem('4/4/2004 1:00:00 PM');
end;
end
|
271
|
How can I display an item or a cell on multiple lines

with ComboBox1 do
begin
ScrollBySingleLine := True;
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := AddItem('Cell 1');
CellCaption[OleVariant(h),OleVariant(1)] := 'This is bit of text that''s shown on multiple lines';
CellSingleLine[OleVariant(h),OleVariant(1)] := EXCOMBOBOXLib_TLB.exCaptionWordWrap;
end;
end
|
198
|
How can I display all cells using multiple lines

with ComboBox1 do
begin
(IUnknown(Columns.Add('MultipleLine')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellSingleLine] := OleVariant(False);
(IUnknown(Columns.Add('SingleLine')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellSingleLine] := OleVariant(True);
with Items do
begin
CellCaption[OleVariant(AddItem('This is a bit of long text that should break the line')),OleVariant(1)] := 'this is a bit of long text that''s displayed on a single line';
end;
end
|
199
|
How can I display all cells using HTML format

with ComboBox1 do
begin
(IUnknown(Columns.Add('HTML')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1);
Items.AddItem('<font ;12>T</font>his <b>is</b> an <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></font>.');
end
|
190
|
How can I display a tooltip when the cursor hovers the column

with ComboBox1 do
begin
(IUnknown(Columns.Add('tooltip')) as EXCOMBOBOXLib_TLB.Column).ToolTip := 'This is a bit of text that is shown when user hovers the column.';
end
|
159
|
How can I display a multiple pictures to a cell or item

with ComboBox1 do
begin
DefaultItemHeight := 48;
HTMLPicture['pic1'] := 'c:\exontrol\images\zipdisk.gif';
HTMLPicture['pic2'] := 'c:\exontrol\images\auction.gif';
Columns.Add('C1');
with Items do
begin
CellCaptionFormat[OleVariant(AddItem('<img>pic1</img> Text <img>pic2</img> another text ...')),OleVariant(0)] := EXCOMBOBOXLib_TLB.exHTML;
end;
end
|
406
|
How can I display a filter field in the bottom part of the drop down portion

with ComboBox1 do
begin
BeginUpdate();
FilterForVisible := True;
IntegralHeight := True;
Columns.Add('Default');
with Items do
begin
AddItem('Item 1');
AddItem('Item 2');
AddItem('Item 3');
AddItem('Item 4');
AddItem('Item 5');
end;
EndUpdate();
end
|
310
|
How can I display a divider item, merging all cells

with ComboBox1 do
begin
MarkSearchColumn := False;
TreeColumnIndex := -1;
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := AddItem('Cell 1');
CellCaption[OleVariant(h),OleVariant(1)] := 'This is bit of text that''s shown on multiple lines. This is bit of text that''s shown on multiple lines.';
CellSingleLine[OleVariant(h),OleVariant(1)] := EXCOMBOBOXLib_TLB.exCaptionWordWrap;
h := AddItem('This is bit of text that''s displayed on the entire item, divider.');
ItemDivider[h] := 0;
CellHAlignment[OleVariant(h),OleVariant(0)] := EXCOMBOBOXLib_TLB.CenterAlignment;
end;
end
|
485
|
How can I display a different column, on the control's label (method 2)

with ComboBox1 do
begin
BeginUpdate();
Style := EXCOMBOBOXLib_TLB.DropDownList;
SingleEdit := True;
LabelColumnIndex := 1;
DrawGridLines := EXCOMBOBOXLib_TLB.exVLines;
(IUnknown(Columns.Add('Column 1')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1);
(IUnknown(Columns.Add('Column 2')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1);
with Items do
begin
CellCaption[OleVariant(AddItem('Item 1 on <b>Column 1')),OleVariant(1)] := 'Item 1 on <b>Column 2';
CellCaption[OleVariant(AddItem('Item 2 on <b>Column 1')),OleVariant(1)] := 'Item 2 on <b>Column 2';
CellCaption[OleVariant(AddItem('Item 3 on <b>Column 1')),OleVariant(1)] := 'Item 3 on <b>Column 2';
SelectItem[FirstVisibleItem] := True;
end;
EndUpdate();
end
|
484
|
How can I display a different column, on the control's label (method 1)

with ComboBox1 do
begin
BeginUpdate();
Style := EXCOMBOBOXLib_TLB.DropDownList;
SingleEdit := True;
SearchColumnIndex := 1;
DrawGridLines := EXCOMBOBOXLib_TLB.exVLines;
(IUnknown(Columns.Add('Column 1')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1);
(IUnknown(Columns.Add('Column 2')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1);
with Items do
begin
CellCaption[OleVariant(AddItem('Item 1 on <b>Column 1')),OleVariant(1)] := 'Item 1 on <b>Column 2';
CellCaption[OleVariant(AddItem('Item 2 on <b>Column 1')),OleVariant(1)] := 'Item 2 on <b>Column 2';
CellCaption[OleVariant(AddItem('Item 3 on <b>Column 1')),OleVariant(1)] := 'Item 3 on <b>Column 2';
SelectItem[FirstVisibleItem] := True;
end;
EndUpdate();
end
|
410
|
How can I display a different caption in the label area, when I click the cell's check box

// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.ComboBox1CellStateChanged(ASender: TObject; Cell : HCELL);
begin
with ComboBox1 do
begin
LabelText := Cell;
OutputDebugString( Items.CellCaption[OleVariant(0),OleVariant(Cell)] );
OutputDebugString( Items.CellState[OleVariant(0),OleVariant(Cell)] );
end
end;
with ComboBox1 do
begin
BeginUpdate();
Style := EXCOMBOBOXLib_TLB.DropDownList;
IntegralHeight := True;
HeaderVisible := False;
SingleEdit := True;
SearchColumnIndex := -1;
AdjustSearchColumn := False;
(IUnknown(Columns.Add('Language')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellHasCheckBox] := OleVariant(True);
with Items do
begin
AddItem('English');
AddItem('Hebrew');
AddItem('Spanish');
end;
LabelText := ' <b>custom</b> text ';
EndUpdate();
end
|